package cn.jianyongjie.basic.mapper;

import cn.jianyongjie.basic.query.BaseQuery;
import cn.jianyongjie.org.domain.Department;
import cn.jianyongjie.org.query.DepartmentQuery;
import cn.jianyongjie.system.domain.Role;

import java.util.List;

/**
* @Description: TODO
* @Author: JianYongJie
* @Version: 1.0
* @Date:  2022/4/25 16:45
*/
public interface BaseMapper<T> {
    /*
     * @Title: DepartmentMapper
     * @Description: 分页高级查询
     * @Author: Jian Yongjie
     * @Version: 1.0
     * @Date:  2022/4/19 18:42
     * @Parameters: * @param departmentQuery
     * @Return java.util.List<cn.jianyongjie.org.domain.Department>
     */
    List<T> queryData(BaseQuery baseQuery);

    /*
     * @Title: DepartmentMapper
     * @Description: 根据id查询数据
     * @Author: Jian Yongjie
     * @Version: 1.0
     * @Date:  2022/4/19 18:43
     * @Parameters: * @param id
     * @Return cn.jianyongjie.org.domain.Department
     */
    T LoadById(Long id);

    /*
     * @Title: DepartmentMapper
     * @Description: 根据id删除数据
     * @Author: Jian Yongjie
     * @Version: 1.0
     * @Date:  2022/4/19 18:43
     * @Parameters: * @param id
     * @Return void
     */
    void remove(Long id);

    /*
     * @Title: DepartmentMapper
     * @Description: 新增数据
     * @Author: Jian Yongjie
     * @Version: 1.0
     * @Date:  2022/4/19 18:43
     * @Parameters: * @param department
     * @Return void
     */
    void save(T t);

    /*
     * @Title: DepartmentMapper
     * @Description: 修改数据
     * @Author: Jian Yongjie
     * @Version: 1.0
     * @Date:  2022/4/19 18:43
     * @Parameters: * @param department
     * @Return void
     */
    void update(T t);

    /*
     * @Title: DepartmentMapper
     * @Description: 查询总条数
     * @Author: Jian Yongjie
     * @Version: 1.0
     * @Date:  2022/4/22 10:07
     * @Parameters: * @param null
     * @Return
     */
    Long queryCount(BaseQuery baseQuery);

    /*
     * @Title: DepartmentMapper
     * @Description: 批量删除
     * @Author: Jian Yongjie
     * @Version: 1.0
     * @Date:  2022/4/23 12:36
     * @Parameters: * @param ids
     * @Return void
     */
    void batchRemove(List<Long> ids);

    /*
     * @Title: DepartmentMapper
     * @Description: 查询所有数据
     * @Author: Jian Yongjie
     * @Version: 1.0
     * @Date:  2022/4/24 11:58
     * @Parameters: * @param null
     * @Return
     */
    List<T> loadAll();
}
